package org.example.work.Mapper;

import org.apache.ibatis.annotations.*;
import org.example.work.entity.orders;

import java.util.List;
@Mapper
public interface Ordersmapper {
    @Select({"select *from orders"})
    List<orders> selectall();
    @Insert({"insert into orders(user_id,totprice) values (#{user_id},#{totp})"})
    int insert(int user_id,int totp);
@Select({"select *from orders where user_id=#{id}"})
    List<orders> selectbyid(int id);
@Update({"update orders set totprice=#{totprice} where user_id=#{user_id}"})
    int update(int user_id,int totprice);
}
